package cn.zb.zbrhback.auth.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel(value = "权限实体类",description = "权限的所有字段")
public class Permission {

    @ApiModelProperty(value = "主键id")
    private Long id;

    @ApiModelProperty(value = "权限名称")
    private String name;

    @ApiModelProperty(value = "请求接口")
    private String url;

    @ApiModelProperty(value = "权限描述")
    private String descs;

    @ApiModelProperty(value = "权限唯一标识")
    private String sn;

    @ApiModelProperty(value = "父权限ID")
    private Long parentId;  // 父权限ID

    @ApiModelProperty(value = "父权限")
    private Permission parent;  // 父权限 最主要作用做分类管理 一个权限只有一个父权限

    @ApiModelProperty(value = "子权限")
    private List<Permission> children;
}
